package com.oversea.models;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "majortype")
/*设置动态更新,更新语句只更新改变了的字段而不是更新所有字段的值*/
@org.hibernate.annotations.Entity(dynamicUpdate=true)
//@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class Majortype extends BaseModel {
	private static final long serialVersionUID = -5404056504167584942L;

	private List<Major> majorList;
	private String majorTypeName; // 专业类型名称
	private String majorTypeOverview; // 专业类型概述
	private String careerChoices; // 职业选择
	private String startingSalary; // 起薪

	@OneToMany(cascade= {CascadeType.ALL,CascadeType.REMOVE}, fetch=FetchType.LAZY)
	@JoinColumn(name="major_type_id")
	public List<Major> getMajorList() {
		return majorList;
	}

	public void setMajorList(List<Major> majorList) {
		this.majorList = majorList;
	}

	@Column
	public String getMajorTypeName() {
		return majorTypeName;
	}

	public void setMajorTypeName(String majorTypeName) {
		this.majorTypeName = majorTypeName;
	}

	@Column
	public String getMajorTypeOverview() {
		return majorTypeOverview;
	}

	public void setMajorTypeOverview(String majorTypeOverview) {
		this.majorTypeOverview = majorTypeOverview;
	}

	@Column
	public String getCareerChoices() {
		return careerChoices;
	}

	public void setCareerChoices(String careerChoices) {
		this.careerChoices = careerChoices;
	}

	@Column
	public String getStartingSalary() {
		return startingSalary;
	}

	public void setStartingSalary(String startingSalary) {
		this.startingSalary = startingSalary;
	}

}
